/*
 * @Author: hashMi 854059946@qq.com
 * @Date: 2023-10-29 11:30:01
 * @LastEditors: hashMi 854059946@qq.com
 * @LastEditTime: 2023-10-29 11:30:05
 * @FilePath: /guiguzhenxuan/src/utils/time.ts
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
//封装函数：获取当前时间段
export const getTime = () => {
  let message = ''
  //通过内置构造函数Date
  const hour = new Date().getHours()
  if (hour <= 9) {
    message = '早上'
  } else if (hour <= 14) {
    message = '上午'
  } else if (hour <= 18) {
    message = '下午'
  } else {
    message = '晚上'
  }
  return message
}
